﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.Odbc;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class public_html_NewSite_CMSV2_Grafik_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ReviewerMySql SQL = new ReviewerMySql();
        OdbcDataReader MyReader = SQL.ExecuteReader("SELECT * FROM V2_ForsidePost WHERE Aktiv = 'False' ORDER BY id DESC");
        while (MyReader.Read())
        {
            DivForside.InnerHtml += "<a href=\"FrontPageImage.aspx?id=" + MyReader["id"].ToString() + "\">" + MyReader["ForsideType"].ToString() + " - " + MyReader["Titel"].ToString() + "</a><br />";
        }

        OdbcDataReader MyReaderActive = SQL.ExecuteReader("SELECT * FROM V2_ForsidePost WHERE Aktiv = 'True' ORDER BY id DESC LIMIT 22");
        while (MyReaderActive.Read())
        {
            DivForsideActive.InnerHtml += "<a href=\"FrontPageImageEdit.aspx?id=" + MyReaderActive["id"].ToString() + "\">" + MyReaderActive["ForsideType"].ToString() + " - " + MyReaderActive["Titel"].ToString() + "</a><br />";
        }
    }
}
